package cn.lizemin.controller;

import cn.lizemin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;

/**
 * @author lizemin
 * @version 1.0
 */
@RestController
public class UserController {

    @Autowired
    @Qualifier(value = "user")
    private UserService userService;

    @GetMapping("/speak")
    public String speak() {

        return userService.print();
    }

    @GetMapping("/getDate")
    public String getDate() {
        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.getTime());
        return calendar.getTime().toString();

    }

}
